package Test1;
//判断一个字符串是否是对称字符串。如aba,abba等是对称字符串,abab等不是对称。
import java.util.Scanner;
public class mirrorString {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        System.out.print("请输入一个字符串：");
        String str = s.next();

        char[] arr = str.toCharArray();
        int left = 0;
        int right = str.length()-1;
        int flag = 0;

        while(left < right){
            if(arr[left] != arr[right]){
                flag = 1;
                break;
            }
            left++;
            right--;
        }

        if(flag == 1)
            System.out.println("NO");
        else
            System.out.println("YES");
    }
}
